// 提供一个vue插件对象, 必须提供一个install方法
// 封装插件的目的: 全局注册很多组件
import PageTools from './PageTools'
import UploadExcel from './UploadExcel'
import ImageUpload from './ImageUpload'
import ScreenFull from './ScreenFull'
import ThemePicker from './ThemePicker'
import Lang from './Lang'
import TagsView from './TagsView'

export default {
  install(Vue) {
    // 写逻辑...
    console.log('插件install被调用了...')
    Vue.component('PageTools', PageTools)

    // 上传excel组件的全局注册 (组件需要一个解读excel的包 yarn add xlsx@0.17.4)
    Vue.component('UploadExcel', UploadExcel)

    Vue.component('ImageUpload', ImageUpload)
    Vue.component('ScreenFull', ScreenFull)
    Vue.component('ThemePicker', ThemePicker)
    Vue.component('Lang', Lang)
    Vue.component('TagsView', TagsView)
  }
}
